﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using PNProject.EF;
using System.Globalization;

namespace PNProject.Controllers
{
    public class IntroController : Controller
    {
        //
        // GET: /Intro/

        public ActionResult Index()
        {
            var member = Membership.GetUser();
            if (member != null)
            {
                var userName = member.UserName;
                Utils.TrackingUser(null, userName, "IntroController", "Index", Request.Url.PathAndQuery.ToString());
            }
            bool lang = CultureInfo.CurrentUICulture.Name == "vi-VN" ? true : false;
            if (lang)
            {
                var model = StaticData.oneContentRepo.GetOne(a => a.OneContentID == 1);
                return View(model);
            }
            else
            {
                var model = StaticData.oneContentRepo.GetOne(a => a.OneContentID == 6);
                return View(model);
            }            
        }

    }
}
